<?php

declare(strict_types=1);

namespace App\Fastapp\Model;

use Hyperf\Database\Model\SoftDeletes;
use Mine\MineModel;

/**
 * @property int $id 主键
 * @property \Carbon\Carbon $created_at 创建时间
 * @property \Carbon\Carbon $updated_at 更新时间
 * @property string $deleted_at 删除时间
 * @property array $name 名称
 * @property string $symbol 币种代码
 * @property string $icon 图标
 * @property string $address 充值地址/合约地址
 * @property int $parent_id 0主链
 * @property int $chain_id 链id
 * @property string $scan_url 浏览地址
 * @property int $sort 排序
 * @property int $type 1法币2加密币3代币
 * @property string $withdrawal_min 最小提币金额
 * @property string $withdrawal_max 最大提币金额
 * @property string $withdrawal_charge 提币手续费
 * @property string $deposit_min 最小质押
 * @property string $recharge_min 最小充值
 * @property string $gas_min 最小gas fee
 * @property int $is_deposit 质押0否1是
 * @property int $is_trade 开启现货交易
 * @property int $is_contract 开启合约交易
 * @property int $is_futures 开启期权交易
 * @property int $is_show 显示0否1是
 * @property int $status 0下架1正常
 * @property int $precision 显示精度
 * @property int $trade_precision 交易精度
 */
class Currency extends MineModel
{
    use SoftDeletes, FileTrait;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'currency';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'created_at', 'updated_at', 'deleted_at', 'name', 'symbol', 'icon', 'address', 'parent_id', 'chain_id', 'scan_url', 'sort', 'type', 'withdrawal_min', 'withdrawal_max', 'withdrawal_charge', 'deposit_min', 'recharge_min', 'gas_min', 'is_deposit', 'is_trade', 'is_contract', 'is_futures', 'is_show', 'status', 'precision', 'trade_precision'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'name' => 'array', 'parent_id' => 'integer', 'chain_id' => 'integer', 'sort' => 'integer', 'type' => 'integer', 'withdrawal_min' => 'decimal:6', 'withdrawal_max' => 'decimal:6', 'withdrawal_charge' => 'decimal:6', 'deposit_min' => 'decimal:6', 'recharge_min' => 'decimal:6', 'gas_min' => 'decimal:6', 'is_deposit' => 'integer', 'is_trade' => 'integer', 'is_contract' => 'integer', 'is_futures' => 'integer', 'is_show' => 'integer', 'status' => 'integer', 'precision' => 'integer', 'trade_precision' => 'integer'];
}
